package com.day12.ex01;

class Cat {
    public void eat() {
        System.out.println("猫吃鱼");
    }
}
class CatOperator {
    public void feed(Cat cat) {
        cat.eat();
    }
    public Cat getCat() {
        Cat cat = new Cat();
        return cat;
    }
}
public class CatDemo {
    public static void main(String[] args) {
        CatOperator operator = new CatOperator();
        Cat cat = operator.getCat();
        operator.feed(cat);
        Cat cat2= new Cat();
        cat2.eat();
    }
}
